/*
 * @Author: your name
 * @Date: 2021-04-17 19:48:11
 * @LastEditTime: 2021-04-18 19:27:22
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Editg
 * @FilePath: \jknjnl\s-1811A-yangbing\day.js
 */
//day1 作业 

// git提交代码汇总
//1. git status                       //查看代码状态
//2. git add (day.js)                  //要提交的文件
//3. git commit -m "updata:data"    //将代码提交到本地仓库
//4. git pull                      //在提交前先拉取一下代码,防止代码冲突(在公司多人开发)
//5. git push                      //将本地代码提交到远程仓库

//注意:1.要在下载仓库的大包打开终端

let arr=[1,2,3,4,5,6,7,8,9,10]

let num=arr.reduce((a,b)=>{
    return a+b
},0)
console.log(123,num);

let arrs=[{
    numa:10,
    nums:10,
},{
    numa:10,
    nums:10,
},{
    numa:10,
    nums:10,
}]

let data=arrs.reduce((x,y)=>{
    return x+(y.numa*y.mums)
},0)
console.log(456,data);

//1. git status
//2. git add day.js
//3. git commit -m "updata:dara"
//4. git pull
//5. git push